<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

//登录
Route::post('/login/authorization', 'TokenController/store');
//注册
Route::post('/login/registere', 'TokenController/registere');
Route::group('admin', function () {
    //用户
    Route::group('user', function () {
        Route::get('/', 'index');
        Route::get('way', 'way');
        Route::get(':id', 'show')->model(\app\model\User::class);
    })->prefix('UserController/');

    //蔬菜
    Route::group('vegetables', function () {
        Route::get('/', 'index');
        Route::post('/', 'store');
    })->prefix('VegetablesController/');

    //新闻
    Route::group('news', function () {
        Route::get('/', 'index');
        Route::get(':id', 'show')->model(\app\model\News::class);
        Route::post('/', 'store');
    })->prefix('NewsController/');

    //消息
    Route::group('information', function () {
        Route::get('/', 'index');
        Route::post('/', 'store');
    })->prefix('InformationController/');
});




